package top.lv666.graduation_design_serve.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.lv666.graduation_design_serve.pojo.Blog;
import top.lv666.graduation_design_serve.pojo.Topic;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface TopicMapper {
    //    获取有多少个话题
    int getCount();

    List<Topic> getHotSearchTopicList(int getPage, int getNumber);

    // 查询话题列表
    List<Topic> getTopicList(int getPage, int getNumber);

    // 查询
    Topic getTopicById(String id);

    // 修改话题信息
    void modifyTopic(Map<String, Object> map);

    void createTopic(Map<String, Object> map);

    Topic queryTopic(String id);

    // 获取热门话题
    List<Blog> queryTopicBlogHot(Map<String, Object> map);

    // 获取最新话题
    List<Blog> queryTopicBlogNow(Map<String, Object> map);

    // 添加话题博文
    void createTopicBlog(Map<String, Object> map);
}
